<template>
  <div class="w">
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img
            src="https://photo7n.gracg.com/9a565e4b575aad592ddc3c238dad8132.jpg"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://photo7n.gracg.com/a63a0cad74179ebb5beeba2cde43ea3b.jpg"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://photo7n.gracg.com/admin_3077ba001ddad46a561b2e762f046f58.jpg"
            alt=""
          />
        </div>
      </div>

      <div class="swiper-pagination"></div>
      <div class="buttons">
        <div class="swiper-button-prev swiper-button-white"></div>
        <div class="swiper-button-next swiper-button-white"></div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from "../assets/swiper/dist/js/swiper.min.js";
import "../assets/swiper/dist/css/swiper.min.css";
export default {
  name: "Banner",
  methods: {
    _initSwiper() {
      var mySwiper = new Swiper(".swiper-container", {
        autoplay: 5000, //可选选项，自动滑动
        loop: true,
        pagination: ".swiper-pagination",
        prevButton: ".swiper-button-prev",
        nextButton: ".swiper-button-next",
      });
    },
  },
  mounted() {
    this._initSwiper();
  },
};
</script>

<style lang="less" scoped>
.swiper-container {
  width: 1200px;
  height: 356px;
  .swiper-wrapper {
    width: 100%;
  }
  img {
    width: 100%;
    height: 100%;
  }
}
.buttons {
  width: 1200px;
}
</style>